@extends('admin.master')

@section('top')
<div class="top-breadcrumb pull-left">{!! Breadcrumbs::render('admin.customer-note.edit', $note->customer->id) !!}</div>
@endsection

@section('content')
<div class="container-common common-text mark-body">
	<h2>{{ $note->customer->name }}</h2>
	<div class="box-block box-form">
		{!! Form::model($note, ['route' => ['admin.customer-note.update', $note->id], 'method'=>'patch', 'id'=>'customer-note-form']) !!}
			<div class="form-group">
				<div class="row">
					{!! Form::text('title', null, ['class'=>'form-control customer-note-title', 'placeholder'=>'笔记标题', 'data-rule'=>'required']) !!}
			    </div>
		    </div>
			<div class="form-group">
		    	<script id="editor" name="content" type="text/plain">{!! $note->content !!}</script>
		    </div>
		    <div class="form-group">
		    	<input type="submit" class="btn btn-primary btn-lg" value="保存笔记">
		    </div>
		{!! Form::close() !!}
	</div>
</div>
@endsection

@section('foot')
<script src="{{ url('js/ueditor/ueditor.config.js') }}"></script>
<script src="{{ url('js/ueditor/ueditor.all.min.js') }}"></script>
<script src="{{ url('js/nice-validator/jquery.validator.min.js?local=zh-CN') }}"></script>
<script>
	UE.getEditor('editor', {
		initialFrameHeight : 500
	});
</script>
@endsection